package com.cyh.ebptpubjar.cfgflowinf.controller;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.cyh.ebptpubjar.cfgflowinf.entity.CfgFlowinfEntity;
import com.cyh.ebptpubjar.cfgflowinf.dao.CfgFlowinfDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import java.util.List;

/**
* CfgFlowinfController
* 
* @author  cyh
* @version v0.0.1
* 描述：自动生成的代码
* 时间：2022-01-14 14:59:09
*/

@Component
public class CfgFlowinfController{

    @Autowired
    private CfgFlowinfDao cfgFlowinfDao;

    /**
    * 新增 
    * @param entity
    * @return
    */
    public int insert(CfgFlowinfEntity entity){
        return cfgFlowinfDao.insert(entity);
    }

    /**
    * 批量新增 
    * @param entitys
    * @return
    */
    public int insertBatch(List<CfgFlowinfEntity> entitys){
        return cfgFlowinfDao.insertBatch(entitys);
    }

    /**
    * 编辑(根据主键) 
    * @param entity
    * @return
    */
    public int updateByKey(CfgFlowinfEntity entity){
        return cfgFlowinfDao.updateByKey(entity);
    }
    /**
    * 删除(根据主键) 
    * @param entity
    * @return
    */
    public int deleteByKey(CfgFlowinfEntity entity){
        return cfgFlowinfDao.deleteByKey(entity);
    }

    /**
    * 批量删除 
    * @param entitys
    * @return
    */
    public int deleteBatchByCondition(List<CfgFlowinfEntity> entitys){
        return cfgFlowinfDao.deleteBatchByCondition(entitys);
    }
    /**
    * 删除(自定义) 
    * @param entity
    * @return
    */
    public int deleteByCondition(CfgFlowinfEntity entity){
        return cfgFlowinfDao.deleteByCondition(entity);
    }
    /**
    * 查询 
    * @param entity
    * @return
    */
    public CfgFlowinfEntity getByKey(CfgFlowinfEntity entity){
        return cfgFlowinfDao.getByKey(entity);
    }

    /**
    * 分页查询 
    * @param page,entity
    * @return
    */
    public List<CfgFlowinfEntity> getByCondition(IPage<?> page, CfgFlowinfEntity entity){
        return cfgFlowinfDao.getByCondition(page,entity);
    }

    /**
    * 批量分页查询 
    * @param page,entitys
    * @return
    */
    public List<CfgFlowinfEntity> getBatchByCondition(IPage<?> page, List<CfgFlowinfEntity> entitys){
        return cfgFlowinfDao.getBatchByCondition(page,entitys);
    }

    /**
    * 按照条件查询总数 
    * @param entity
    * @return
    */
    public int selectCountByCondition(CfgFlowinfEntity entity){
        return cfgFlowinfDao.selectCountByCondition(entity);
    }
}